home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / xlib03.zip / XFILEIO.H < prev    next >
Text File  |  1993-04-05  |  2KB  |  67 lines

  1. /*-----------------------------------------------------------------------
  2. ;
  3. ; XFILEIO - header file
  4. ;
  5. ;
  6. ;
  7. ; ****** XLIB - Mode X graphics library                ****************
  8. ; ******                                               ****************
  9. ; ****** Written By Themie Gouthas                     ****************
  10. ; ****** Aeronautical Research Laboratory              ****************
  11. ; ****** Defence Science and Technology Organisation   ****************
  12. ; ****** Australia                                     ****************
  13. ;
  14. ; egg@dstos3.dsto.gov.au
  15. ; teg@bart.dsto.gov.au
  16. ;
  17. ;  Terminology & notes:
  18. ;         VRAM ==   Video RAM
  19. ;         SRAM ==   System RAM
  20. ;         X coordinates are in pixels unless explicitly stated
  21. ;
  22. ;-----------------------------------------------------------------------*/
  23.  
  24. #ifndef _XFILEIO_H_
  25. #define _XFILEIO_H_
  26.  
  27. #define F_RDONLY  0
  28. #define F_WRONLY  1
  29. #define F_RDWR    2
  30.  
  31. #define SEEK_START 0
  32. #define SEEK_CURR  1
  33. #define SEEK_END   2
  34.  
  35. #define FILE_ERR -1
  36.  
  37. /* FUNCTIONS =========================================================== */
  38.  
  39. extern int f_open(              /* Open a file returning its handle */
  40.      char * filename,
  41.      char access);
  42.  
  43. extern int f_close(             /* Close a file  */
  44.      int handle);
  45.  
  46. extern int f_read(              /* Read a block of data from a file */
  47.      int handle,
  48.      char far * buffer,
  49.      int count);
  50.  
  51. extern int f_write(             /* Write a block of data to a file */
  52.      int handle,
  53.      char far * buffer,
  54.      int count);
  55.  
  56. extern long int f_seek(         /* Position the file pointer */
  57.      int handle,
  58.      long int position,
  59.      char method_code);
  60.  
  61. extern long int f_filelength(   /* Return the length of the file */
  62.      int handle);
  63.  
  64. #endif
  65.  
  66.  
  67.